package day04;

import java.util.Objects;

public class Person {
    private String name;
    private String number;
    private String group;

    public Person(String name, String number, String group) {
        this.name = name;
        this.number = number;
        this.group = group;
    }

    public String getName() {
        return name;
    }

    public String getNumber() {
        return number;
    }

    public String getGroup() {
        return group;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Person person = (Person) o;
        return name.equals(person.name) && number.equals(person.number) && group.equals(person.group);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, number, group);
    }
}
